#include "HttpServerModule.h"

bool HttpServerModule::InitModule()
{
    auto sp_beast_http_server = std::make_shared<BeastHttpServer>();
    sp_beast_http_server->SetRequestHandler(std::make_shared<HttpApiHttpServerRequestHandler>());
    if (!sp_beast_http_server->StartServer(9099, 2))
    {
        return false;
    }

    return true;
}

HttpServerModule& HttpServerModule::Get()
{
    static HttpServerModule httpserverModule;
    return httpserverModule;
}